/*
 * Filename: g:\espidf_workspace\idf_S3_T-Watch\main\network\wifi.h
 * Path: g:\espidf_workspace\idf_S3_T-Watch\main\network
 * Created Date: Monday, June 23rd 2025, 3:26:01 pm
 * Author: sss
 * 
 * Copyright (c) 2025 Your Company
 */
/**
 * example 
 * 
    Wifi& wifi = Wifi::get_instance();
    // const char *ssid = "ssid";
    // const char *password = "password";
    // wifi.connect(ssid, password);

    wifi.smartconfig_start();
*/

#pragma once

#include "esp_err.h"


class Wifi {
public:
    static Wifi& get_instance(){
        static Wifi instance;
        return instance;
    };

    Wifi(Wifi const&) = delete;
    Wifi& operator=(Wifi const&) = delete;

    void connect(const char* ssid, const char* password);
    void connect();
    void disconnect();
    void smartconfig_start();
    void smartconfig_stop();
    bool is_connected();

    char ip_address[16];
    bool is_connected_flag = false;

private:
    Wifi();
    ~Wifi();
};
